package edu.pku.sei.mte.compositetrans.flow;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.w3c.dom.Element;

public class JoinNode extends ActivityNode {

	private List<FlowNode> preNodes = null;
	
	
	public List<FlowNode> getPreNodes() {
		if(preNodes == null)
			preNodes = new ArrayList<FlowNode>();
		return preNodes;
	}

	@Override
	public boolean isReady(){
		boolean flag = true;
		for(FlowNode fn : preNodes){
			if(!fn.isSucceed())
				flag = false;
		}
		return flag;
	}

	@Override
	public void load(Element e, Map<Integer, FlowNode> FlowNodesMap) {
		super.load(e, FlowNodesMap);
	}

}
